package mylibrary.com.thinking.java.chapter10.s106;

public class AnonymousConstructor {

	public static Base getBase(int i) {
		return new Base(i) {
			
			//instance initializer for each object
			{
				System.out.println("Inside instance initializer");	
			}
			
			public void f() {
				System.out.println("In anonymous f()");
			}
		};
	}
	
	public static void main(String[] args) {
		
		Base base = getBase(3);
		base.f();
	}
}
